home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / v9n03.arc / CHECK.BAT < prev    next >
DOS Batch File  |  1990-01-12  |  3KB  |  54 lines

  1. ECHO OFF
  2. : CHECK allows checking of a specific disk datasets
  3. IF "%1"=="" goto Help
  4. IF %1==? goto Help
  5. IF "%2"=="" goto Help
  6. IF "%PATH%"=="\))PCITK.TMP" GOTO Start
  7. : If we have not used FASTrun to create ))PCITK.TMP, set path to use floppy
  8. PATH=%2\
  9. CD %2\
  10. IF NOT EXIST %2MIRDIR.COM GOTO MisFil
  11. IF NOT EXIST %2CHKFILEC.COM GOTO MisFil
  12. :Start
  13. ECHO Checking file %1 against compressed CHKfileC report file on %2
  14. CHKFILEC %1 ))TEMP.LOG
  15. IF ERRORLEVEL 4 GOTO BadFIL
  16. MIRdir %2
  17. IF ERRORLEVEL 32 GOTO BadCHK
  18. :  To also see addtions and deletions of files, remove the /C parameter.
  19. CFCOMPC %2))A.LOG ))TEMP.LOG/P/C
  20. DEL ))TEMP.LOG
  21. CD %2\
  22. GOTO End
  23. :Help
  24. ECHO ╔═════════════════════════════════════════════════════════════════════════╗
  25. ECHO ║ CHECK will check the file or files specified against check data         ║
  26. ECHO ║ recorded on the check diskette and report any changes.                  ║
  27. ECHO ╟─────────────────────────────────────────────────────────────────────────╢
  28. ECHO ║ Syntax  CHECK filename a:                                               ║
  29. ECHO ║     filename is the file or files to be checked.                        ║
  30. ECHO ║              filename may include wildcard characters (? and *).        ║
  31. ECHO ║     a: specifies the drive which contains the CHECK diskette for the    ║
  32. ECHO ║        current drive.                                                   ║
  33. ECHO ╟─────────────────────────────────────────────────────────────────────────╢
  34. ECHO ║    PCDATA TOOLKIT 1.0 Copyright (C) 1990 Ziff Communications Co.        ║
  35. ECHO ║                    PC Magazine ■ Wolfgang Stiller                       ║
  36. ECHO ╚═════════════════════════════════════════════════════════════════════════╝
  37. GOTO End
  38. :MisFil
  39. ECHO ╔═════════════════════════════════════════════════════════════════════════╗
  40. ECHO ║ You do not appear to have the necessary files on disk %2. MIRDIR.COM    ║
  41. ECHO ║ or CHKFILEC.COM is missing.                                             ║
  42. ECHO ╚═════════════════════════════════════════════════════════════════════════╝
  43. GOTO End
  44. :BadFil
  45. ECHO File name: %1 was not found in the current directory
  46. GOTO End
  47. :BadCHK
  48. ECHO ╔═════════════════════════════════════════════════════════════════════════╗
  49. ECHO ║ The corresponding directory was not found on the disk in drive %2.      ║
  50. ECHO ║ This usually means that the correct CHECK diskette is not in %2 or      ║
  51. ECHO ║ you have added directories since you last ran SCANmax or SCANsys.       ║
  52. ECHO ╚═════════════════════════════════════════════════════════════════════════╝
  53. :End
  54.